package singleton.demo1;

/**
 * 静态代码块初始化本质和第一个没区别
 */
public class Test02 {
    private Test02(){}

    private static final Test02 INS;

    static {
        INS = new Test02();
    }

    public static Test02 getInstance(){
        return INS;
    }

    public void say(){
        System.out.println("Test02");
    }
}
